#python -u "d:\300manga\300MangaIndex.py"

import os
import html

TypeIDList = [69,398,68,66,71,70,224,225,226,227,228,229,230,231,232,234,236,329,330,333,342,335,336,337,338,339,340,341,105,343,421,235]

num2 = 5
num1 = 50 * num2 + 1
print("D:\\300manga\\ChinesizedMangaIndex1220\\"+str(50 * num2 + 50))
count = num1
while count < num1 + 50:
    f1 = open("D:\\300manga\\ChinesizedMangaIndex1220\\"+str(50 * num2 + 50)+"\\view-source_https___bbs.yamibo.com_forum-30-"+str(count)+".html","r",encoding="gb18030",errors="ignore")
    Linelist = f1.readlines()
    f1.close()
    print("\n"+str(count).zfill(2))
    for line in Linelist:
        line = html.unescape(line)
        for TypeID in TypeIDList:
            if "typeid="+str(TypeID) in line and "全部主题" not in line:
                print(line[line.find("</a>\"></span>")+13:line.find("</a>\"></span>")+17],end = "; ")
                print(line[line.find("s xst</span>\"></span>")+21:len(line)-35],end = "; ")
                print(line[line.find("https://bbs.yamibo.com/thread"):line.find(".html")+5])
    count += 1
    